package com.ktwlsoft.archivemanage.domain.dao.entity.mend;

import com.ktwlsoft.archivemanage.domain.dao.entity.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import lombok.Getter;
import lombok.Setter;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 整改单
 */
@Getter
@Setter
public class MendList extends BaseEntity {

    /**
     * 模板id
     *
     * @mbg.generated
     */
    @ApiModelProperty("模板外键Id")
    private Long temId;

    /**
     * 业务检查外键
     */
    @ApiModelProperty("业务检查外键Id")
    private Long inspectId;

    /**
     * 模板名称
     *
     * @mbg.generated
     */
    @ApiModelProperty("模板名称")
    private String temName;

    /**
     * 指导单号
     *
     * @mbg.generated
     */
    @ApiModelProperty("指导单号")
    private String guidNum;

    /**
     * 立档单位
     *
     * @mbg.generated
     */
    @ApiModelProperty("立档单位")
    private String archiveUnit;

    /**
     * 指导员
     *
     * @mbg.generated
     */
    @ApiModelProperty("指导员")
    private String instructor;

    /**
     * 指导员id
     *
     * @mbg.generated
     */
    @ApiModelProperty("指导员Id")
    private Long instructorId;

    /**
     * 地址
     *
     * @mbg.generated
     */
    @ApiModelProperty("地址")
    private String gpsAddress;

    /**
     * 档案员
     *
     * @mbg.generated
     */
    @ApiModelProperty("档案员")
    private String archivist;

    /**
     * 档案员Id
     *
     * @mbg.generated
     */
    @ApiModelProperty("档案员Id")
    private Long archivistId;

    /**
     * 档案员电话
     *
     * @mbg.generated
     */
    @ApiModelProperty("档案员电话")
    private String archivistPhone;

    /**
     * 整改说明
     *
     * @mbg.generated
     */
    @ApiModelProperty("整改说明")
    private String mendRemark;

    /**
     * 总分
     *
     * @mbg.generated
     */
    @ApiModelProperty("总分")
    private BigDecimal fullMark;

    /**
     * 得分
     *
     * @mbg.generated
     */
    @ApiModelProperty("得分")
    private BigDecimal mark;

    /**
     * 整改后得分
     *
     * @mbg.generated
     */
    @ApiModelProperty("整改后得分")
    private BigDecimal mendMark;

    /**
     * 整改状态, WAIT_MEND(待整改), WAIT_VERIFY(待验证), REPULSE_MEND(打回待整改), VERIFY_PASS(验证通过)
     *
     * @mbg.generated
     */
    @ApiModelProperty("整改状态, WAIT_MEND(待整改), WAIT_VERIFY(待验证), REPULSE_MEND(打回待整改), VERIFY_PASS(验证通过)")
    private MendState mendState = MendState.WAIT_MEND;

    /**自查意见**/
    @ApiModelProperty("自查意见(自查意见)")
    private String selfAdvice;

    /**自查签字**/
    @ApiModelProperty("自查签字(自查意见)")
    private String selfSign;

    /**
     * 检查意见(复查意见)
     */
    @ApiModelProperty("检查意见(复查意见)")
    private String guidAdvice;

    /**检查员签字(复查意见)**/
    @ApiModelProperty("检查员签字(复查意见)")
    private String instructorSign;

    /**
     * 被检查意见(确认意见)
     */
    @ApiModelProperty("被检查意见(确认意见)")
    private String unitAdvice;

    /**
     * 被检查单位签字(确认意见)
     *
     * @mbg.generated
     */
    @ApiModelProperty("被检查单位签字(确认意见)")
    private String unitSign;

    /**
     * 被指导单位签字时间
     *
     * @mbg.generated
     */
    @ApiModelProperty("被指导单位签字时间")
    private Date unitSignDate;

    /**自查得分**/
    @ApiModelProperty("自查得分")
    private BigDecimal selfInspectMark;

    /**自查印证材料档号**/
    @ApiModelProperty("自查印证材料档号")
    private String selfConfirmMaterialReference;

    /**自查提交时间**/
    @ApiModelProperty("自查提交时间")
    private Date selfInspectCommitTime;

    /**复查得分**/
    @ApiModelProperty("复查得分")
    private BigDecimal repeatInspectMark;

    /**复查印证材料档号**/
    @ApiModelProperty("复查印证材料档号")
    private String repeatConfirmMaterialReference;

    /**复查提交时间**/
    @ApiModelProperty("复查提交时间")
    private Date repeatInspectCommitTime;

    /**
     * 验证备注
     */
    @ApiModelProperty("验证备注")
    private String verifyRemark;

    @ApiModelProperty("单位地址")
    private String unitAddress;

    @ApiModelProperty("整改单选项")
    private transient List<MendSubject> subjects;

    public MendList() {

    }

    public MendList(Long temId, Long inspectId, String temName, String guidNum, String archiveUnit, String instructor, Long instructorId, String instructorSign, String gpsAddress, String archivist, Long archivistId, String archivistPhone, String mendRemark, String unitSign, Date unitSignDate, BigDecimal fullMark, BigDecimal mark, BigDecimal mendMark, MendState mendState, String guidAdvice, String unitAdvice) {
        this.temId = temId;
        this.inspectId = inspectId;
        this.temName = temName;
        this.guidNum = guidNum;
        this.archiveUnit = archiveUnit;
        this.instructor = instructor;
        this.instructorId = instructorId;
        this.instructorSign = instructorSign;
        this.gpsAddress = gpsAddress;
        this.archivist = archivist;
        this.archivistId = archivistId;
        this.archivistPhone = archivistPhone;
        this.mendRemark = mendRemark;
        this.unitSign = unitSign;
        this.unitSignDate = unitSignDate;
        this.fullMark = fullMark;
        this.mark = mark;
        this.mendMark = mendMark;
        this.mendState = mendState;
        this.guidAdvice = guidAdvice;
        this.unitAdvice = unitAdvice;
    }

    public enum MendState {
        /**
         * 待整改
         */
        WAIT_MEND,
        /**
         * 待验证
         */
        WAIT_VERIFY,
        /**
         * 打回待整改
         */
        REPULSE_MEND,
        /**
         * 验证通过
         */
        VERIFY_PASS
    }
}